import {useContext} from 'react'
import {myContext} from './parent'

export default ()=>{

     let {msg,num} = useContext(myContext);

    return(
        <>
        <h3>组件2</h3>
        <h4>{msg}----{num}</h4>
        </>
    )
}